/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航样式 */
.header {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    padding: 0 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 600;
    padding: 16px 0;
}

.header .logo i {
    margin-right: 12px;
    font-size: 28px;
}

.nav {
    display: flex;
    gap: 8px;
    padding-bottom: 16px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.nav-item i {
    font-size: 18px;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    padding: 32px;
}

.welcome-section {
    text-align: center;
    margin-bottom: 48px;
}

.welcome-section h1 {
    font-size: 36px;
    color: #1976d2;
    margin-bottom: 16px;
    font-weight: 600;
}

.welcome-section p {
    font-size: 18px;
    color: #666;
    margin-bottom: 48px;
}

/* 快速操作卡片 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.action-card {
    background: white;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.action-card i {
    font-size: 48px;
    color: #1976d2;
    margin-bottom: 20px;
}

.action-card h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 12px;
    font-weight: 600;
}

.action-card p {
    color: #666;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* 按钮样式 */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        padding: 0 16px;
    }
    
    .nav {
        flex-wrap: wrap;
    }
    
    .nav-item {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .main-content {
        padding: 24px 16px;
    }
    
    .welcome-section h1 {
        font-size: 28px;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .action-card {
        padding: 24px 20px;
    }
}

/* 表格样式 */
.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.table-header {
    background: #f8f9fa;
    padding: 16px 24px;
    border-bottom: 1px solid #e9ecef;
}

.table-header h3 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

td {
    color: #333;
    font-size: 14px;
}

tr:hover {
    background-color: #f8f9fa;
}

/* 表单样式 */
.form-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.form-row {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    align-items: center;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #495057;
    font-weight: 500;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

select.form-control {
    background-color: white;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-delivered {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-normal {
    background-color: #d4edda;
    color: #155724;
}

.status-expired {
    background-color: #f8d7da;
    color: #721c24;
}

/* 操作按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-primary {
    background-color: #1976d2;
    color: white;
}

.btn-primary:hover {
    background-color: #1565c0;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

/* 筛选器样式 */
.filter-container {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-item label {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

.filter-item select {
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.page-item {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    text-decoration: none;
    color: #495057;
    transition: all 0.3s ease;
}

.page-item:hover {
    background-color: #f8f9fa;
    border-color: #1976d2;
    color: #1976d2;
}

.page-item.active {
    background-color: #1976d2;
    border-color: #1976d2;
    color: white;
}

/* 页面标题样式 */
.page-header {
    margin-bottom: 32px;
    text-align: center;
}

.page-header h1 {
    font-size: 32px;
    color: #1976d2;
    margin-bottom: 12px;
    font-weight: 600;
}

.page-header p {
    font-size: 16px;
    color: #666;
}

/* 主页面标题样式 */
.main-content .table-header:first-child {
    margin-bottom: 32px;
    text-align: center;
    background: transparent;
    border: none;
    padding: 0;
}

.main-content .table-header:first-child h1 {
    font-size: 32px;
    color: #1976d2;
    margin-bottom: 12px;
    font-weight: 600;
}

.main-content .table-header:first-child p {
    font-size: 16px;
    color: #666;
}

/* 统计卡片样式 */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #1976d2;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* 扫码区域样式 */
.scan-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.scan-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
}

.scan-header {
    margin-bottom: 24px;
    text-align: center;
}

.scan-header h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 600;
}

.scan-header p {
    color: #666;
    font-size: 14px;
}

.scan-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.scan-row {
    display: flex;
    gap: 20px;
}

.scan-group {
    flex: 1;
}

.scan-group label {
    display: block;
    margin-bottom: 8px;
    color: #495057;
    font-weight: 500;
    font-size: 14px;
}

.scan-input-group {
    display: flex;
    gap: 8px;
}

.scan-input-group .form-control {
    flex: 1;
}

.scan-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 16px;
}

.scan-info {
    display: flex;
    flex-direction: column;
}

.info-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.info-card h4 {
    color: #495057;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-card li {
    padding: 8px 0;
    color: #666;
    font-size: 14px;
    border-bottom: 1px solid #e9ecef;
}

.info-card li:last-child {
    border-bottom: none;
}

.info-card li:before {
    content: "•";
    color: #1976d2;
    font-weight: bold;
    margin-right: 8px;
}

/* 分析图表样式 */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
}

.analysis-item h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

.analysis-chart {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chart-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chart-label {
    width: 80px;
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

.chart-bar-fill {
    height: 24px;
    border-radius: 12px;
    min-width: 20px;
    transition: width 0.3s ease;
}

.chart-value {
    font-size: 14px;
    color: #495057;
    font-weight: 600;
    min-width: 40px;
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-container {
    background: white;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background-color: #f8f9fa;
    color: #333;
}

.modal-body {
    padding: 24px;
}

/* 表单分区样式 */
.form-section {
    margin-bottom: 32px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.form-section h4 {
    color: #495057;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-header h4 {
    margin: 0;
}

/* 胶水申请项样式 */
.glue-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.glue-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}

.glue-item-header h5 {
    margin: 0;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 表单操作按钮 */
.form-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e9ecef;
}

/* 弹窗动画 */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 响应式设计补充 */
@media (max-width: 768px) {
    .scan-container {
        grid-template-columns: 1fr;
    }
    
    .scan-row {
        flex-direction: column;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .scan-actions {
        flex-direction: column;
    }
    
    .modal-container {
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .form-section {
        padding: 16px;
    }
    
    .form-actions {
        flex-direction: column;
    }
}
